﻿namespace KingerRobot.MexicoSailunWMS.SpiService;
internal interface IProdSku
{
    /// <summary>
    /// 创建SKU
    /// </summary>
    /// <param name="prodSkuBean">添加队形</param>
    /// <returns>Sku信息</returns>
    POProdSku CreateProdSku(ProdSkuBean prodSkuBean);

    /// <summary>
    /// 通过ID获取单元
    /// </summary>
    /// <param name="skuId"></param>
    /// <returns></returns>
    POProdSku GetProdSkuById(long? skuId);

    /// <summary>
    /// 通过skuCode 获取单元
    /// </summary>
    /// <param name="skuCode"></param>
    /// <returns></returns>
    POProdSku GetProdSkuBySkuCode(string skuCode);

    /// <summary>
    /// 删除
    /// </summary>
    /// <param name="skuCode"></param>
    /// <returns></returns>
    POProdSku DeleteProSku(string skuCode);
    /// <summary>
    /// 得到SKU列表
    /// </summary>
    /// <returns></returns>
    List<POProdSku> GetProdSkuList();
    /// <summary>
    /// 根据任务获取SKU
    /// </summary>
    /// <param name="taskIds"></param>
    /// <returns></returns>
    List<POProdSku> GetProdSkuListByTaskIds(List<long?> taskIds);
}

internal class ProdSkuBean
{
    /// <summary>
    /// SKU 编号
    /// </summary>
    public string SkuCode { get; set; }
    /// <summary>
    /// 物料ID
    /// </summary>
    public long MaterialId { get; set; }
    /// <summary>
    /// 批次
    /// </summary>
    public string ProductBatch { get; set; }
    /// <summary>
    /// 生产时间
    /// </summary>
    public DateTime? MdTime { get; set; }
}